<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home | 深大人的微型博客</title>
<link href="css/account.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="iecss.css" />
<![endif]-->
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/home.js"></script>
<script type="text/javascript" src="js/weibo_ajax.js"></script>
<script type="text/javascript" src="js/weibo_counter.js"></script>
<script type="text/javascript" src="js/concerns_ajax.js"></script>
<script type="text/javascript" src="js/user_detail.js"></script>

<script type="text/javascript">	
$(function(){
var $div_li =$("ul.left_menu li");
$div_li.click(function(){
		$(this).addClass("selected")            //当前<li>元素高亮
		.siblings().removeClass("selected");  //去掉其它同辈<li>元素的高亮
	}).hover(function(){
		$(this).addClass("hover");
		},function(){
	$(this).removeClass("hover");
});

/*隐藏与打开评论框*/ 
   	$("div#comment_box").hide();

   	$(".weibo_button a:contains('评论')").live('click',function(){
		$(this).parent().nextAll("#comment_box").toggle();
		return false;
	}); 

   	/*搜索框控制*/
	$("#searchinfo").focus(function(){
		$("#searchinfo").val("");
	});
	$("#searchinfo").blur(function(){
		if(!$("#searchinfo").val()){
			$("#searchinfo").val("找微博,找人");
		}
	});
	$("#search").click(function(){
		if(!$("#searchinfo").val()){
			return false;
		}
		else if($("#searchinfo").val() == "找微博,找人"){
			return false;
		}
		else{
			return true;
		}
	});  
});
</script>
</head>
<body onload="startdate(),startTime()">

<?php
include_once 'msg_redirect.php';	/*通过使用cookie，当检查出未登陆，则不予进入home.php，返回index.php*/
if($_COOKIE['TTU'] != "logined"){
	msg_redirect("您还未登录哦！", "index.php");
}?>


<div id="main_container">

	<div id="header" >

       <div class="top_right">
       
            <div class="weather">
              <div class="weather_text" id="date"></div>
              <div class="weather_text" id="time"></div>
              <div class="weather_img">
              <a href="#"><img src="image/w_cloudy.png" border="0" width="60" height="60"/></a></div>
            </div>
            
            <div class="big_banner">
            <a href="#"><img src="image/life.jpg" border="0" width="180" height="100"/></a>
            <a href="#"><img src="image/love.jpg"  border="0" width="180" height="100"/></a>
            <a href="#"><img src="image/reading.jpg" border="0" width="180" height="100"/></a>
         </div>
        
        </div>
    
  
        <div id="logo">
            <a href="index.html"><img src="image/logo.png" alt="" title="" border="0" width="240" height="125" /></a>
	    </div>
        

        

    </div>
    
   <div id="main_content"> 
   
            <div id="menu_tab">
                    <ul id="menu">
                    	<li><a href="home.php">首 页</a></li>
                        <li><a href="#">热 门  <img src="image/more.png" /></a>
                         	<ul>
        						<li><a href="hotpeople.php">微博达人</a></li>
        						<li><a href="hotweibo.php">热门微博</a></li>
      						</ul>
                      </li>
                         <li><a href="#">应 用 <img src="image/more.png" /></a>
                         	<ul>
        						<li><a href="photo.php">相册</a></li>
        						<li><a href="collection.php">收藏</a></li>
                                <li><a href="find.php">找人</a></li>
        						<li><a href="#">我的课表</a></li>
        						<li><a href="#">公文通</a></li>
      						</ul>
                         </li>                                                   
                         <li><a href="my_weibo.php">我的主页</a></li>

                         <li><a href="#">消 息  <img src="image/more.png" /></a>
                         	<ul>
        						<li><a href="comment.php">查看评论</a></li>
        						<li><a href="cencerns_from.php">查看粉丝</a></li>
        						<li><a href="my_concerns.php">查看关注</a></li>
      						</ul>
                         </li>                     
                         <li><a href="#">帐 号  <img src="image/more.png" /></a>
                         	<ul>
        						<li><a href="account_info">帐号设置</a></li>
        						<li><a href="logout.php">注销</a></li>
      						</ul>
                         </li>
                         
                    </ul>

            </div><!-- end of menu tab -->
            
    
    <div class="left_content">
     <div class="border_box">
		<form action="findresult_weibo.php" method="get">
			<input type="text" name="searchinfo" id="searchinfo" class="searchinfo_input" value="找微博,找人"/>
        	<input type="submit" name="search" id="search" value="搜索"/>
        </form>
     </div>  
     	<ul class="left_menu">
        <span class="border_m"></span>
     	<li><a href="findresult_weibo.php?searchinfo=<?php echo $_GET['searchinfo']; ?>">微博</a></li>
        <span class="border_m"></span>
        <li class="selected"><a href="findresult_people.php?searchinfo=<?php echo $_GET['searchinfo']; ?>">找人</a></li>
        </ul>  
        
    
   </div><!-- end of left content --> 



   <div class="center_content">
	  <div class="center_title">"<?php 
	  $u_name = $_GET['searchinfo'];
	  echo "$u_name";?>"的找人结果</div>
      <span class="border_c"></span>
      <div id="cencerns_box"><?php
	include_once("sql_connect.php");
	include_once 'msg_redirect.php';
	/*根据昵称查找*/

	/*取得，搜索人的u_no*/
	$u_name = $_GET['searchinfo'];
	$my_sql = mysql_query("select u_no from user_info where u_name  LIKE '%$u_name%'");
	$my_result = mysql_fetch_array($my_sql);
	
	if ($u_name){
	$find_content = "";
	if($my_result){
	do{
		$find_content .= "<div class='cencerns_box'>";
		$find_content .= "<div class='cencerns_img'><img src=";
		
		$c_no = $my_result[0];
		
		/*输出头像*/
    	$show_head_sql = mysql_query("select h_data from head where u_no='$c_no'",$connection);
    	$show_head_result = mysql_fetch_array($show_head_sql);
    	$my_data = $show_head_result[h_data];
    	if (!$my_data){
    		$find_content .= "'head_image/09.jpg' width='45' height='45' border='0' /></div>";
    	}
    	else $find_content .= "'".$my_data."'width='45' height='45' border='0' /></div>";
    	
    	/*输出昵称*/
    	$find_content .= "<div class='cencerns_name'>";
    	$user_sql = mysql_query("select u_name from user_info where u_no='$c_no'",$connection);
    	$user_result = mysql_fetch_array($user_sql);
    	$user_data = $user_result[0];   						
    	$find_content .= $user_data."</div>";
    	
    	/*显示学院*/
    	$find_content .= "<div class='cencerns_from'>";
    	$user_sql = mysql_query("select u_dept from user_detail where u_no='$c_no'",$connection);
    	$user_result = mysql_fetch_array($user_sql);
    	$user_data = $user_result[0];   						
    	$find_content .= $user_data."</div>";
    	
    	$find_content .= "<div class='cencerns_button'><a href='##'>取消关注</a></div>";
      
    	/*输出关注数、粉丝数，以及微博数*/
    	$find_content .= "<div class='cencerns_f'>关注";

    	/*显示关注数量*/
    	$show_sql = mysql_query("select max(c_num) from concerns where u_no='$c_no'",$connection);
    	$show_result = mysql_fetch_array($show_sql);
    	$my_data = $show_result[0];   						
    	$find_content .= $my_data;
    	/*显示粉丝数量*/
    	$find_content .= "&nbsp;&nbsp;|&nbsp;&nbsp;粉丝";
    	$show_sql = mysql_query("select max(f_num) from concerns where c_no='$c_no'",$connection);
    	$show_result = mysql_fetch_array($show_sql);
    	$my_data = $show_result[0];   						
    	$find_content .= $my_data;
    	/*显示微博数量*/
    	$find_content .= "&nbsp;&nbsp;|&nbsp;&nbsp;微博";
    	$show_sql = mysql_query("select max(w_num) from weibo where u_no='$c_no'",$connection);
    	$show_result = mysql_fetch_array($show_sql);
    	$my_data = $show_result[0];   						
    	$find_content .= $my_data."&nbsp;&nbsp;</div>";
    	
    	/*显示简介*/
    	$find_content .= "<div class='cencerns_info'>简介:";
    	$user_sql = mysql_query("select u_mydesc from user_detail where u_no='$c_no'",$connection);
    	$user_result = mysql_fetch_array($user_sql);
    	$user_data = $user_result[0];   						
    	$find_content .= $user_data."</div><span class='border_cen2'></span></div>";

  	}while ($my_result = mysql_fetch_array($my_sql));
	}
	echo $find_content;
	}
?>
      
           
	</div>  
   </div><!-- end of center content -->



 
   </div><!-- end of main content -->
   
   
   
   <div class="footer">深圳大学计算机与软件学院@毕业设计项目网站<br />指导老师：王华明<br />项目负责：陈作鑫<br />
    小组成员：陈作鑫&nbsp;&nbsp;陈志杰&nbsp;&nbsp;赖晓东
  </div>                 


</div>
<!-- end of main_container -->
</body>
</html>